<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html>
	<head>
		<style type="text/css">
		#Mysend_div{
			margin: 20px;
			margin-left: 60px;
			
		}
		.div_com{
			width: 90%;
			margin-bottom:8px;
			height: 22px;
		}
		.div_com_content{
			padding-top:2px;
			padding-left:4px;
			width: 30%;
			height: 22px;
			border: 1px solid black;
			float: left;
		}
		.div_com_date{
			padding-left:4px;
			padding-top:2px;
			width: 35%;
			height: 22px;
			border: 1px solid black;
			float: left;
			margin-left: -1px;
		}
		.div_com_cstate{
			padding-left:4px;
			padding-top:2px;
			width: 33%;
			height: 22px;
			border: 1px solid black;
			float: left;
			margin-left: -1px;
		}
		</style>
	</head>
	<body>
		<div id="Mysend_div">
			<c:choose>
				<c:when test="${empty complaintlist}">
					<h3>您没有收到消息</h3>
				</c:when>
				<c:otherwise>
					<c:forEach items="${complaintlist}" var="complaint" varStatus="status">
						<div class="div_com">
							<div class="div_com_content">
								<a style="text-decoration:none;" href="../complaint_todetailInfo.action?comscript=${status.count}" target="div_statu1_frame">
									<c:set var="subStr" value="${complaint.title}"/>  
				                     <c:choose>   
				                            <c:when test="${fn:length(subStr) > 10}">   
				                                	<c:out value="投诉内容 :  ${fn:substring(subStr, 0, 10)}..." />   
				                            </c:when>   
				                            <c:otherwise>   
				                                   <c:out value="投诉内容 :  ${subStr}" />   
				                        	</c:otherwise>   
				                     </c:choose>
								</a>
							</div>
							<div class="div_com_date">
								投诉日期 :${complaint.date}
							</div>
							<div class="div_com_cstate">
								处理情况 :
								<c:choose>
									<c:when test="${complaint.cstate eq 'undo'}">工作人员还未处理</c:when>
									<c:when test="${complaint.cstate eq 'doing'}">工作人员正在处理中</c:when>
									<c:when test="${complaint.cstate eq 'done'}">工作人员已经处理</c:when>
								</c:choose>
							</div>
						</div>			
					</c:forEach>
				</c:otherwise>
			</c:choose>
		</div>
	</body>
</html>
